{{define "content"}}
<div class="container">
    <div class="content-wrap">
        <div class="title">
            <div class="more">
                {{range .categories}}
                <a href="/?category_id={{.Id}}">{{.Name}}</a>
                {{end}}
            </div>
        </div>
        <div class="content center">
            {{if .posts}}
            {{range .posts}}
            <div class="excerpt">
                <header>
                    <a class="cat" href="#">{{.CategoryName}}<i></i></a>
                    <h2><a href="/post?id={{.Id}}">{{.Title}}</a></h2>
                </header>
                {{.Description}}
                <p class="meta">
                    <a class="category" href="#"><i class="glyphicon glyphicon-folder-open"></i> {{.CategoryName}}</a>
                    <a class="time" href="#"><i class="glyphicon glyphicon-time"></i> {{.UpdatedAt.Format "2006-01-02 15:04:05"}}</a>
                    <a class="views" href="#"><i class="glyphicon glyphicon-eye-open"></i> {{.Views}}</a>
                </p>

            </div>
            {{end}}
            {{else}}
            <div class="text-center">
                <h3>
                    <stong>暂无内容</stong>
                </h3>
            </div>
            {{end}}
            <nav aria-label="Page navigation" style="float: right;">
                {{.pages}}
            </nav>
        </div>

    </div>
</div>

{{end}}